package com.muyu.danmo.mapper;

import java.util.List;

import com.muyu.danmo.domain.DanmoCommunityFavorite;
import com.muyu.danmo.domain.DanmoTrainingFavorite;
import org.apache.ibatis.annotations.Param;

/**
 * 培训班收藏Mapper接口
 * 
 * @author kunzong
 * @date 2024-11-27
 */
public interface DanmoTrainingFavoriteMapper 
{
    /**
     * 查询培训班收藏
     * 
     * @param id 培训班收藏主键
     * @return 培训班收藏
     */
    public DanmoTrainingFavorite selectDanmoTrainingFavoriteById(Long id);

    /**
     * 查询培训班收藏列表
     * 
     * @param danmoTrainingFavorite 培训班收藏
     * @return 培训班收藏集合
     */
    public List<DanmoTrainingFavorite> selectDanmoTrainingFavoriteList(DanmoTrainingFavorite danmoTrainingFavorite);

    /**
     * 新增培训班收藏
     * 
     * @param danmoTrainingFavorite 培训班收藏
     * @return 结果
     */
    public int insertDanmoTrainingFavorite(DanmoTrainingFavorite danmoTrainingFavorite);

    /**
     * 修改培训班收藏
     * 
     * @param danmoTrainingFavorite 培训班收藏
     * @return 结果
     */
    public int updateDanmoTrainingFavorite(DanmoTrainingFavorite danmoTrainingFavorite);


    /**
     * 删除培训班收藏
     * @param postId
     * @return
     */
    public int deleteDanmoTrainingFavoriteById(@Param("postId") Long postId);

    /**
     * 批量删除培训班收藏
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoTrainingFavoriteByIds(Long[] ids);

    /**
     * 根据培训班id和用户id查询收藏状态
     * @param postId
     * @param userid
     * @return
     */
    DanmoTrainingFavorite selectDanmoCollectMaterialByIdAndUserId(@Param("postId") Long postId, @Param("userid") Long userid);

    DanmoTrainingFavorite selectDanmoCommunityFavoriteById(@Param("id") Long id);

    /**
     * 查询收藏的培训班
     * @param userId
     * @return
     */
    List<DanmoTrainingFavorite> selectDanmoCommunityFavoriteByUserId(Long userId);
}
